﻿using System.Collections.Generic;
using BLL.Services.Categories.Listing;

namespace BLL.Services.Categories
{
    public interface ICategoriesService
    {
        /// <summary>
        /// Gets the get all categories.
        /// </summary>
        /// <value>
        /// The get all categories.
        /// </value>
        IEnumerable<Category> GetAllCategories { get; }

        /// <summary>
        /// Gets the category by id.
        /// </summary>
        /// <param name="categoryId">The category id.</param>
        Category GetCategoryById(int categoryId);

        /// <summary>
        /// Creates the specified category.
        /// </summary>
        /// <param name="category">The category.</param>
        void Create(Category category);

        /// <summary>
        /// Saves the specified category.
        /// </summary>
        /// <param name="category">The category.</param>
        void Save(Category category);

        /// <summary>
        /// Deletes the specified category id.
        /// </summary>
        /// <param name="categoryId">The category id.</param>
        void Delete(int categoryId);

        /// <summary>
        /// Gets the category listing.
        /// </summary>
        /// <param name="page">The page.</param>
        /// <param name="size">The size.</param>
        /// <param name="column">The column.</param>
        /// <param name="direction">The direction.</param>
        /// <param name="filter">The filter.</param>
        CategoryListing GetCategoryListing(int page, int size, string column, int direction, CategoryFilter filter);

        /// <summary>
        /// Validates the category.
        /// </summary>
        /// <param name="categoryId">The category id.</param>
        /// <param name="name">The name.</param>
        bool ValidateCategory(int categoryId, string name);
    }
}